<%@page import="com.imut.bean.ArticleClassify"%>
 <%@ page import="java.util.*" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
	body {
	    background-image: url("../show/images/pageturner.png");
	    background-repeat: no-repeat;
	}
 
	a{
		text-decoration: none;
	}
	a:visited {
		
		color: #0000EE;
	}
	.mytable{

    border:1px solid #A6C1E4;

    font-family:Arial;

    border-collapse: collapse;

}

table th{

    border:1px solid black;

    background-color:#71c1fb;

    width:100px;

    height:20px;

    font-size:15px;

}

table td{

    border:1px solid #A6C1E4;

    text-align:center;

    height:15px;

    padding-top:5px;

    font-size:12px;

}

 

.double{

    background-color:#c7dff6;

}
	</style>
</head>
<body>
<%request.setCharacterEncoding("UTF-8");%>
	<% 
		ArrayList<ArticleClassify> arraylist=(ArrayList<ArticleClassify>)session.getAttribute("arraylist");
		
	%> 
	<a href="articleClassifyadd.jsp" >增加分类</a>
	<table class="mytable" align="center" border="1" width="1000" >
		<caption><b>文章分类</b></caption>
		<tr >
			<th>序号</th>
			<th>类名</th>
			<th>操作</th>
		</tr>
		<% 
			/* forEach(ArticleClassify cs  : articleClassifies){ */
			if(arraylist!=null){
				Iterator<ArticleClassify> it = arraylist.iterator();
				while(it.hasNext()){
					ArticleClassify articleClassifies=it.next();
		 			pageContext.setAttribute("articleClassifies", articleClassifies);
		%>
		<tr class="double">
		   <td><%=articleClassifies.getClassid() %></td>
			<td><%=articleClassifies.getClassname() %></td>
			<td><a href="../EditClassServlet?id=${articleClassifies.classid }">修改</a>||
			    <a href="../DeleteArticleClassifyServlet?id=${articleClassifies.classid }" onclick="return confirm('确定删除该文章分类吗？');">删除</a></td>
		</tr>
		<%
				}
			}
		%>
	</table>
	
</body>
</html>